<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!--     <link rel="shortcut icon" href="../../assets/ico/favicon.png"> -->

<title>SGI</title>

<!-- Bootstrap core CSS -->
<link href="css/bootstrap-3.1.1.css" rel="stylesheet" media="screen">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
      <script src="../../assets/js/html5shiv.js"></script>
      <script src="../../assets/js/respond.min.js"></script>
    <![endif]-->
</head>

<body>
	<%@include file="header.jsp"%>

	<div class="container">
		<%
			if (((String) request.getAttribute("ERROR_MENSAJE")) != null) {
		%>
		<div class="alert alert-danger">${ERROR_MENSAJE}</div>
		<%
			}
		%>
		
		<%
			if (((String) request.getAttribute("SUCCESS_MENSAJE")) != null) {
		%>
		<div class="alert alert-success">${SUCCESS_MENSAJE}</div>
		<%
			}
		%>
		
		
		<p>
			<strong>Mantenimiento de Centros de Formacion &gt; Buscar</strong>
		</p>

		<form id="form1" name="form1" method="post"
			action="CentroFormacionBuscarServlet" class="form-horizontal"
			role="form">
			<p>
				Buscar: <label> <input type="text" name="nombre" id="nombre" />
				</label> <label> <input type="submit" name="button" id="button"
					value="Buscar" />
				</label> <label> <input type="button" name="button2" id="button2"
					value="Nuevo"
					onclick="window.location='centro_formacion_nuevo.jsp' " />
				</label>
			</p>
		</form>
		<div class="table-responsive">
			<table width="100%" height="65" border="1" cellpadding="0"
				cellspacing="0" class="table table-hover">
				<tr>
					<th width="49" scope="col">Nro.</th>
					<th width="250" scope="col">Nombre</th>
					<th width="107" scope="col">Tipo</th>
					<th width="107" scope="col">URL</th>
					<th width="107" scope="col">Logo</th>
					<th width="192" scope="col">Acciones</th>
				</tr>

				<%@page import="java.util.*, com.jnetwork.modelo.CentroFormacion"%>
				<%
					Collection<CentroFormacion> arreglo = (ArrayList<CentroFormacion>) request
							.getAttribute("centrosFormacion");
					if (arreglo != null) {
						int i = 1;
						for (CentroFormacion x : arreglo) {
				%>
				<tr>
					<td><%=i++%></td>
					<td>
						<%
							out.print(x.getNombre());
						%>
					</td>
					<td>
						<%
							out.print(x.getTipo());
						%>
					</td>
					<td>
						<%
							out.print(x.getUrl());
						%>
					</td>
					<td><img class="img-circle" style="width: 50px; height: 50px;"
						src="img/<%out.print(x.getLogo());%>"></td>
					<td><a
						href="<%=request.getContextPath()%>/CentroFormacionEditarServlet?id=<%=x.getId()%>">Editar</a></td>
				</tr>
				<%
					}
					}
				%>

			</table>
		</div>

		<!-- Site footer -->
		<div class="footer">
			<p>&nbsp;</p>
			<p>&copy; JNetwork 2014</p>
		</div>

	</div>
	<!-- /container -->




	<!-- Bootstrap core JavaScript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->

	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
	<script src="js/jquery-1.10.2.js"></script>
	<!-- Include all compiled plugins (below), or include individual files as needed -->
	<script src="js/bootstrap-3.1.1.js"></script>
</body>
</html>
